package com.groupbuying.settleproducer.mq;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 订单消息MQ配置文件
 * @Author cuich
 * @Date 2019-05-15
 */
@Component
public class SettleMQConfig {
    public static String TOPIC ;
    public static String ORDERTOPIC ;
    public static String STORETOPIC ;
    public static String CHEETAHTOPIC;
    public static String CURRENCYTOPIC;
    public static  String GROUP_ID;
    public static final String ACCESS_KEY = "LTAIkLoCSLqX7QFG";
    public static final String SECRET_KEY = "anr8xwxEFrN4Rq0Gjw5MXxELuDb12V";
    public static final String NAMESRV_ADDR = "http://onsaddr.mq-internet-access.mq-internet.aliyuncs.com:80";
    //订单状态前缀
    public static final String ORDER_TAG_PREFIX = "ORDER_";

    //注入订单中心的topic
    @Value("${RocketMQ_Key.Order.Topic}")
    private void setOrderTopic(String TOPIC) {SettleMQConfig.ORDERTOPIC = TOPIC;}

    //注入对应中心的topic
    @Value("${RocketMQ_Key.Settle.Topic}")
    private void setTOPIC(String TOPIC) {SettleMQConfig.TOPIC = TOPIC;}

    @Value("${RocketMQ_Key.Cheetah.Topic}")
    private void setCheetahTOPIC(String CHEETAHTOPIC) {
        SettleMQConfig.CHEETAHTOPIC = CHEETAHTOPIC;

    }
    //注入currency中心的topic
    @Value("${RocketMQ_Key.Currency.Topic}")
    private void setCurrencyTOPIC(String CURRENCYTOPIC) {
        SettleMQConfig.CURRENCYTOPIC = CURRENCYTOPIC;
    }
    //注入对应中心的groupId
    @Value("${RocketMQ_Key.Settle.GroupId}")
    private void setGroupId(String groupId) { SettleMQConfig.GROUP_ID = groupId;}

    //订单状态：退款中
    public static final String ORDER_TAG_REFUNDING = ORDER_TAG_PREFIX+"REFUNDING";
    //订单状态：退款成功
    public static final String ORDER_TAG_REFUNDED = ORDER_TAG_PREFIX+"REFUNDED";
    //订单状态：退款失败
    public static final String ORDER_TAG_REFUNDFAIL = ORDER_TAG_PREFIX+"REFUNDFAIL";
    //支付调用结算内部分账
    public static final String SETTLE_SPLIT_TAG = "SETTLE_SPLIT";
    //public static final String YSASYNCHRONOUS_TAG="YSSPLITRETURN";
    //银盛提现异步回执
    public static final String YSWITHDRAWALRECEIPT_TAG = "WITHDRAWALRECEIPT";
    //通知银盛发起分账--回执
    public static final String YSSPLITRECEIPT_TAG = "YSSPLITRECEIPT";
    //通知银盛分账
    public static final String YSSPLIT_TAG = "YSSPLIT";
    //银盛代打款异步回执
    public static final String YSPAYMENT_TAG = "YSPAYMENT";
    //分账完毕通知调用商户中心tag
    public static final String NOTIFYSTORE_TAG = "NOTIFYSTORE";
    //订单支付查询退款数据
    public static final String ORDER_PAYMENT_REFUND_TAG = "ORDERPAYMENTREFUND";
    //currency中心修改用户积分
    public static final String CURRENCY_CHANGE_INTEGRALS = "CURRENCYCHANGEINTEGRALS";
    //tmp订单流水数据
    public static final String TMP_ORDER_FLOW_REFUND_TAG = "TMPORDERFLOWEREFUND";
    //tmp订单结算数据
    public static final String TMP_ORDER_SETTLE_REFUND_TAG = "TMPORDERSETTLEREFUND";
    //tmp订单支付退款数据
    public static final String TMP_ORDER_PAY_REFUND_TAG = "TMPORDERPAYEREFUND";
    //消费者订阅全部tag
    public static final String ALL_TAG = "*";

    /**
     * NAMESRV_ADDR, 请在mq控制台 https://ons.console.aliyun.com 通过"实例管理--获取接入点信息--TCP协议接入点"获取
     */


}
